import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
// import { component } from 'vue/types/umd'
import RgiSter from '@/views/RgiSter.vue'
// import { component } from 'vue/types/umd'
import RegiSter from '@/views/RegiSter.vue'
// import { component } from 'vue/types/umd'
import HomePage from '@/views/HomePage.vue'
import BusiNess from '@/views/BusiNess.vue'
import SysTwm from '@/views/SysTwm.vue'

Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    name:'rgister',
    component:RgiSter
  },
  {
    path: '/home',
    name: 'home',
    component: HomeView,
    children:[{
      path:'/home',
      name:'homepage',
      component:HomePage
    },
    {
      path:'/home/business',
      name:'business',
      component: BusiNess
    },
    {
      path:'/home/systwm',
      name:'systwm',
      component:SysTwm
    }
  ]
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path:'/register',
    name:'register',
    component:RegiSter
  }
]

const router = new VueRouter({
  routes
})

export default router
